﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Design;
using VsxFactory.Modeling.VisualStudio;

namespace VsxFactory.Modeling.Strategies
{
    public interface IStrategiesHost : IDisposable
    {
        void SetSite(IServiceProvider serviceProvider);

        /// <summary>
        /// Create a strategy context instance
        /// </summary>
        /// <param name="strategy">The current strategy</param>
        /// <param name="modelFileName">The model file name</param>
        /// <param name="generationEvent">The generation event</param>
        /// <returns></returns>
        IStrategyContext GetStrategyContext(IGenerationStrategy strategy, IVsProjectFileItem model, CodeGenerationEvent generationEvent);

        void Run(StrategyContext context, System.Threading.CancellationToken cts);   
    }

    public interface ISupportsGenerateCommand
    {
        bool CanExecuteGenerateCommand(IVsProjectItem item);
    }
}
